package com.cn.ztest;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cn.bean.ValiBean;
import com.cn.xc.utils.ValiCodeUtil;

/**
 * FUN:
 * 
 * @author sushy
 * @date 2016-3-24
 */
@Controller
@RequestMapping("login")
public class ValiCodeUtilTest {

	@RequestMapping("/getCode")
	public void execute(HttpServletResponse response, HttpSession session) throws IOException {
		ValiBean bean = new ValiBean();
		bean.setCharNum(8);
		bean.setFontSize(30);
		bean.setHeght(50);
		bean.setWidth(200);
		System.out.println(bean);
		ValiCodeUtil.getValidateCode(response, session, bean);

	}

	@RequestMapping("/topage")
	public String toPage() {
		return "valiCode";
	}

}
